<style type="text/css">
    .dprice{margin-left: 5px;font-size:16px;}
    .tablelist td {padding: 0 15px 0 0;}
    .btn-primary {margin:10px;}
    .col-sm-10 li{list-style: none;}
    td {vertical-align: middle !important;}
    .form-group .col-sm-2 button{margin-top: 0;}
</style>
<div class="bg-light lter b-b wrapper-md ng-scope">
    <h1 class="m-n font-thin h3">
        添加属性
        <div class="pull-right">
            <a href="#/app/attr" class="btn btn-sm btn-default">返回列表</a>
        </div>
    </h1>
</div>

<div class="wrapper-md" style="margin-bottom: 0;padding-bottom: 0;">
    <div class="panel panel-default">
        <div class="panel-heading">
            添加属性
        </div>
            <div class="form-horizontal ng-pristine ng-valid">
                <div class="form-group" style="padding-top: 20px;">
                    <label class="col-sm-2 control-label">名字:</label>
                    <div class="col-sm-4">
                        <input class="form-control  ng-pristine ng-untouched ng-valid"
                               ng-model="ctrl.vm.name" placeholder="请输入名字">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">别名:</label>
                    <div class="col-sm-4">
                        <input class="form-control  ng-pristine ng-untouched ng-valid"
                               ng-model="ctrl.vm.alias" placeholder="请输入别名" >
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">后端是否显示:</label>
                    <div class="col-sm-4">
                        <label class="i-switch m-t-xs m-r">
                            <input type="checkbox" ng-model="ctrl.vm.backend_show">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">筛选项是否显示:</label>
                    <div class="col-sm-4">
                        <label class="i-switch m-t-xs m-r">
                            <input type="checkbox" ng-model="ctrl.vm.fliter_show">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">筛选项类型:</label>
                    <div class="col-sm-4">
                        <select class="form-control" ng-model="ctrl.vm.type">
                            <option value="">类型</option>
                            <!--<option value="range">范围</option>-->
                            <option value="label">标签</option>
                            <option value="image">图片</option>
                            <option value="color">颜色</option>
                            <!--<option value="condition">条件</option>-->
                            <!--<option value="list">列表</option>-->
                        </select>
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-4" style="padding-left: 17.5%">
                        <button class="btn btn-sm btn-success" ng-click="ctrl.vm.addChange()">保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
<!--

<div class="wrapper-md " >
    <div class="panel panel-default">
        <div class="panel-heading">
            属性值
        </div>
        <div class="table-responsive">
            <table class="table table-striped  b-t b-light">
                <thead>
                <tr>
                    <th>id</th>
                    <th>名字</th>
                    <th>icon</th>
                    <th>排序</th>
                    <th>后台可见</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="data in ctrl.vm.data">
                    <td>{{data.id}}</td>
                    <td>{{data.name}}</td>
                    <td>{{data.alias}}</td>
                    <td>
                            <span class="label ng-binding bg-success"
                                  ng-class="{'bg-danger':data.backend_show==0,'bg-success':data.backend_show==1}">
                            <label ng-if="data.backend_show==1">是</label>
                            <label ng-if="data.backend_show==0">否</label>
                            </span>
                    </td>
                    &lt;!&ndash;  <td>{{data.fliter_show}}</td>&ndash;&gt;
                    <td>{{data.created_at}}</td>
                    <td>{{data.updated_at}}</td>
                    <td><button class="btn btn-default btn-sm" ng-click="ctrl.vm.changeAttr(data)">修改</button></td>
                </tr>
                <tr  ng-if="!ctrl.vm.data.length" class="text-center">
                    <td colspan="6">暂无数据！</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>-->
